import cv2 as cv
import numpy as ny


def pyr_up_func():
    src_img = cv.imread('..//lena.png')
    cv.imshow('source image', src_img)

    dst_img = cv.pyrUp(src_img)
    cv.imshow('destination image', dst_img)
    cv.waitKey(0)
    pass


def pyr_down_func():
    i = 5
    win_name = ['image_1', 'image_2', 'image_3', 'image_4', 'image_5']
    src_img = cv.imread('..//lena.png')
    cv.imshow('source image', src_img)
    dst_img = src_img
    while i:
        i = i - 1
        dst_img = cv.pyrDown(dst_img)
        cv.imshow(win_name[i], dst_img)

    cv.waitKey(0)
    pass


if __name__ == '__main__':
    pyr_down_func()
